﻿using System;
using System.Web;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Diagnostics;
using System.Web.Mvc;

namespace FilstartupsREST.Models
{
    public class Post
    {
        [Key]
        public int postidPK { get; set; }
        
        public string posttitle { get; set; }
        
        [AllowHtml]
        [DataType(DataType.Html)]
        [UIHint("Html")]
        public string postdescription { get; set; }
        
        [DisplayFormat(DataFormatString = "{0:MMMM d, yyyy}")]
        public DateTime datecreated { get; set; }
        
        public int catidFK { get; set; }
       

        public byte[] image { get; set; }

        public string filename { get; set; }
        public string imagetype { get; set; }

        public int routingidFK { get; set; }

        public bool featuredpost { get; set; }
    }

    public class EventPost
    {
        public int eventidPK { get; set; }
        public string eventdescription { get; set; }
        public string eventtitle { get; set; }
        public DateTime startdate { get; set; }
        public DateTime enddate { get; set; }
    }
    public class PostDetail
    {
        public int postidPK { get; set; }
        public string posttitle { get; set; }
        public string posdescription { get; set; }
        public DateTime datecreated { get; set; }
    }

    public class LatestPost
    {
        public int postidPK { get; set; }
        public string posttitle { get; set; }
        public string postdescription { get; set; }
        public int catidFK { get; set; }
        public DateTime datecreated { get; set; }
    }
    public class FeaturedPost
    {
        public string postdescription { get; set; }
        public string posttitle { get; set; }
        public int postidPK { get; set; }
    }
    //Test
    public class PostImage_String
    {
        public int postidPK { get; set; }
        public string base64string { get; set; }
        public string filename { get; set; }
        public string imagetype { get; set; }
    }

    public class PostImage
    {
        public byte[] image { get; set; }
        public int postidPK { get; set; }
        public string imagetype { get; set; }
        public string filename { get; set; }
        //public string posttitle { get; set; }
        //public string postdescription { get; set; }
    }

    public class TotalSearch
    {
        public IEnumerable<Post> post_ { get; set; }
        public IEnumerable<Post> post_1 { get; set; }
    }
}